package com.sz.stock.client;


import com.sz.stock.model.Bankcard;
import com.sz.stock.model.ResultBean;
import com.sz.stock.model.TUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@Component
@FeignClient("stock-user")
public interface TUserClient {

    //充值(余额增加)
    @RequestMapping("/user/topup")
    ResultBean topup(@RequestParam("userid") int userid,@RequestParam("balance") BigDecimal balance);

    //提现(余额减少)
    @RequestMapping("/user/withdraw")
    ResultBean withdraw(@RequestParam("userid")int userid,@RequestParam("balance") BigDecimal balance);

    //用过用户ID 查询 银行卡信息
    @RequestMapping("/user/selectBankCardByUserID")
    public Bankcard selectBankCardByUserID(@RequestParam(value = "userid" ,required = false) Integer userid);

}
